﻿#ifndef SCRIPTINSTRUCTIONFACTORY_H
#define SCRIPTINSTRUCTIONFACTORY_H

#include <qobject.h>
#include <qlist.h>

class ScriptInstruction;

class ScriptInstructionFactory : public QObject
{
  Q_OBJECT
public:
  explicit ScriptInstructionFactory();
  virtual ~ScriptInstructionFactory();

public:
  //从二进制得到脚本
  static QList<ScriptInstruction*> fromByteArray(QByteArray data);
  static QList<ScriptInstruction*> fromByteArray(char * const src,int size,int * offset);
  //脚本转二进制
  static QByteArray scriptToByteArray(QList<ScriptInstruction*> script);
};
#endif
